﻿namespace CloudNinja.Metering.Common.Configuration
{
    using System.Configuration;

    public class MeteringRepositorySettingsElement : ConfigurationElement
    {
        [ConfigurationProperty("MeteringDataServiceEndpoint", IsRequired = true, DefaultValue = "http://cnmb.cloudapp.net/MeteringDataService.svc")]
        public string MeteringDataServiceEndpoint
        {
            get
            {
                return (string)this["MeteringDataServiceEndpoint"];
            }

            set
            {
                this["MeteringDataServiceEndpoint"] = value;
            }
        }

        [ConfigurationProperty("UserId", IsRequired = true, DefaultValue = "")]
        public string UserId
        {
            get
            {
                return (string)this["UserId"];
            }

            set
            {
                this["UserId"] = value;
            }
        }

        [ConfigurationProperty("APIKey", IsRequired = true, DefaultValue = "")]
        public string APIKey
        {
            get
            {
                return (string)this["APIKey"];
            }

            set
            {
                this["APIKey"] = value;
            }
        }         
    }
}